﻿namespace Devonline.Entity;

/// <summary>
/// 数据对象模型的 View Model 字符串作为主键的基础抽象类型
/// </summary>
/// <typeparam name="TKey">业务数据主键类型</typeparam>
public abstract class ViewModel : ViewModel<string> { }

/// <summary>
/// 数据对象模型的 View Model 基础抽象类型
/// </summary>
/// <typeparam name="TKey">业务数据主键类型</typeparam>
public abstract class ViewModel<TKey> : EntitySet<TKey>, IViewModel<TKey> where TKey : IConvertible
{
#nullable disable
    /// <summary>
    /// 数据主键
    /// </summary>
    [Column("id"), DisplayName("编号"), MaxLength(36), Excel]
    public override TKey Id { get; set; }
#nullable enable
}